Dekoratives Banner

File read() Method


    File(path).read(chars)

Description

    The File read() method reads the contents of the file from the current position on. Returns a string that contains up to the number of characters that were supposed to be read.

Parameters

    chars

    The number of characters to read, expressed as an integer. If the number of characters to read is not supplied, the entire file is read in one big chunk, starting at the current position. If the file is encoded, multiple bytes may be read to create single Unicode characters.

Returns

    String.